//package cn.zl.netty.server;
//
//import io.netty.bootstrap.ServerBootstrap;
//import io.netty.channel.ChannelInitializer;
//import io.netty.channel.nio.NioEventLoopGroup;
//import io.netty.channel.sctp.nio.NioSctpServerChannel;
//import io.netty.channel.socket.SocketChannel;
//
///**
// * @Description:服务端
// * @Author: zhanglang
// * @Date: 2020/8/24 9:14
// */
//public class SimpleServer {
//    public static void main(String[] args) {
//        NioEventLoopGroup bossGroup = new NioEventLoopGroup(1);
//        NioEventLoopGroup workerGroup = new NioEventLoopGroup();
//        ServerBootstrap bootstrap = new ServerBootstrap()
//                .group(bossGroup,workerGroup)
//                .channel(NioSctpServerChannel.class)
//                .childHandler(new ChannelInitializer<SocketChannel>() {
//                    @Override
//                    protected void initChannel(SocketChannel socketChannel) throws Exception {
//                        socketChannel.pipeline().addLast(new SimpleServerHandler());
//                    }
//                });
//        try {
//            bootstrap.bind(23333).sync();
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }finally {
//            bossGroup.shutdownGracefully();
//            workerGroup.shutdownGracefully();
//        }
//    }
//}
